Navbar :
<nav id="nav">
<div class="nav-center">
<!-- nav header -->
<div class="nav-header">
<!-- logo -->
<img src="./logo.svg" class="logo" alt="logo" />
<!-- 選單按鈕 -->
<button class="nav-toggle">
<i class="fas fa-bars"></i>
</button>
</div>
<!-- links -->
<div class="links-container">
<ul class="links">
<li>
<a href="#home" class="scroll-link">home</a>
</li>
<li>
<a href="#about" class="scroll-link">about</a>
</li>
<li>
<a href="#services" class="scroll-link">services</a>
</li>
<li>
<a href="#tours" class="scroll-link">tours</a>
</li>
</ul>
</div>
</div>
</nav>
nav
nav-toggle
links-container
links
scroll-link
Banner
<div class="banner">
<div class="container">
<h1>scroll project</h1>
<p>Lorem ipsum ...</p>
<!-- Tour按鈕 -->
<a href="#tours" class="scroll-link btn btn-white">explore tours</a>
</div>
</div>
scroll-link
對應內容
<!-- about -->
<section id="about" class="section">
<div class="title">
<h2>about <span>us</span></h2>
</div>
</section>
<!-- services、contant皆與此相同 -->
href="#about"
,可以連結到about的對應內容footer
<!-- footer -->
<footer class="section">
<p>
copyright © backroads travel tours company
<span id="date"></span>. all rights reserved
</p>
</footer>
<!-- 回頂層按鈕 -->
<a class="scroll-link top-link" href="#home">
<i class="fas fa-arrow-up"></i>
</a>
scroll-link
,連結id設為#home
id="date"
在JavaScript中控制